load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

go_library(
    name = "docgen_lib",
    srcs = [
        "diagrams.go",
        "funcs.go",
        "http.go",
        "logformats.go",
        "main.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/cmd/docgen",
    visibility = ["//visibility:private"],
    deps = [
        "//pkg/cli/exit",
        "//pkg/cmd/docgen/extract",
        "//pkg/sql/sem/builtins",
        "//pkg/sql/sem/builtins/builtinsregistry",
        "//pkg/sql/sem/tree",
        "//pkg/util/envutil",
        "//pkg/util/log",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_spf13_cobra//:cobra",
        "@com_gitlab_golang_commonmark_markdown//:markdown",
    ],
)

go_binary(
    name = "docgen",
    embed = [":docgen_lib"],
    visibility = ["//visibility:public"],
)
